﻿IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'GetUsuarioByCredenciales')
	BEGIN
		DROP  Procedure  GetUsuarioByCredenciales
	END

GO

CREATE Procedure GetUsuarioByCredenciales

	(
		@username nvarchar(10),
		@password nvarchar(10)
	)

AS

BEGIN
	SET NOCOUNT ON
	
	SELECT
	[EsAdministrador],
	[FechaRegistro],
	[IdEmpleado],
	[Password],
	[Username]
	FROM [Usuario] 
	WHERE [Username] = @username AND [Password] = @password

	SET NOCOUNT OFF
END
	

GO


GRANT EXEC ON GetUsuarioByCredenciales TO PUBLIC

GO


